package com.rc.pojo.po;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 移动端游客用户表 实体类。
 *
 * @author 27806
 * @since 2024-06-15
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(value = "consumer", schema = "rc")
public class Consumer implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 游客用户id
     */
    @Id(keyType = KeyType.Auto)
    private Long id;

    /**
     * open id
     */
    private String openId;

    /**
     * 余额
     */
    private BigDecimal balance;

    private String avatar;

    private String nickName;

    private String name;

    private String sex;

    private String phone;

    /**
     * 用户创建时间
     */
    @Column(onInsertValue = "now()")
    private LocalDateTime createTime;

    @Column(onInsertValue = "now()",onUpdateValue = "now()")
    private LocalDateTime updateTime;

}
